|
In mathematics, modular arithmetic is a system of arithmetic for integers, where numbers "wrap around" upon reaching a certain value—the modulus. The modern approach to modular arithmetic was developed by Carl Friedrich Gauss in his book ''Disquisitiones Arithmeticae'', published in 1801. A familiar use of modular arithmetic is in the 12-hour clock, in which the day is divided into two 12-hour periods. If the time is 7:00 now, then 8 hours later it will be 3:00. Usual addition would suggest that the later time should be , but this is not the answer because clock time "wraps around" every 12 hours; in 12-hour time, there is no "15 o'clock". Likewise, if the clock starts at 12:00 (noon) and 21 hours elapse, then the time will be 9:00 the next day, rather than 33:00. Because the hour number starts over after it reaches 12, this is arithmetic ''modulo'' 12. According to the definition below, 12 is congruent not only to 12 itself, but also to 0, so the time called "12:00" could also be called "0:00", since 12 is congruent to 0 modulo 12. ==History== The foundations of modular arithmetic were introduced in the third century BCE, by Euclid, in the 7th book of his ''Elements''. ==Congruence relation== Modular arithmetic can be handled mathematically by introducing a congruence relation on the integers that is compatible with the operations on integers: addition, subtraction, and multiplication. For a positive integer ''n'', two integers ''a'' and ''b'' are said to be congruent modulo ''n'', written: : if their difference is an integer multiple of ''n'' (or ''n'' divides ). The number ''n'' is called the ''modulus'' of the congruence. For example, : because , which is a multiple of 12. The same rule holds for negative values: : Equivalently, can also be thought of as asserting that the remainders of the division of both and by are the same. For instance: : because both 38 and 14 have the same remainder 2 when divided by 12. It is also the case that is an integer multiple of 12, which agrees with the prior definition of the congruence relation. A remark on the notation: Because it is common to consider several congruence relations for different moduli at the same time, the modulus is incorporated in the notation. In spite of the ternary notation, the congruence relation for a given modulus is binary. This would have been clearer if the notation had been used, instead of the common traditional notation. The properties that make this relation a congruence relation (respecting addition, subtraction, and multiplication) are the following. If : and : then: * * The above two properties would still hold if the theory were expanded to include all real numbers, that is if were not necessarily all integers. The next property, however, would fail if these variables were not all integers: * 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Modular arithmetic」の詳細全文を読む スポンサード リンク
|